﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Entities;
using Data;
namespace Business
{
   public class KhachHangService
    {
       public static KhachHangDTO GetKhachHangByMaKhachHang(int maKhachHang)
       {
           return KhachHangRepository.GetKhachHangByMaKhachHang(maKhachHang);
       }
       public static DataTable GetKhachHangTable()
       {
           return ConvertTo.DataTable(KhachHangRepository.GetKhachHangList());
       }
       public static List<KhachHangDTO> GetKhachHangList()
       {
           return KhachHangRepository.GetKhachHangList();
       }
       public static int GetCurrentID()
       {
           return KhachHangRepository.GetCurrentID();
       }
       public static void Insert(KhachHangDTO khachHang)
       {
           KhachHangRepository.Insert(khachHang);
       }
       public static void Delete(int maKhachHang)
       {
           KhachHangRepository.Delete(maKhachHang);
       }
       public static void Update(KhachHangDTO khachHang)
       {
           KhachHangRepository.Update(khachHang);
       }

       public static List<KhachHangDTO> Search(string hoTen)
       {
           return KhachHangRepository.Search(hoTen);
       }
       public static List<KhachHangDTO> Search(string hoTen, string diaChi)
       {
           return KhachHangRepository.Search(hoTen, diaChi);
       }
       public static List<KhachHangDTO> Search(string hoTen, string diaChi, string dienThoai)
       {
           return KhachHangRepository.Search(hoTen, diaChi, dienThoai);
       }
       public static List<KhachHangDTO> Search(string hoTen, string diaChi, string dienThoai, string email)
       {
           return KhachHangRepository.Search(hoTen, diaChi, dienThoai,email);
       }
    }
}
